package com.leon.domain.auth;

/**
 * 请求类
 */
public class ApiRequest {

    private String url;

    private String appId;

    private String token;

    private long timestamp;

    public ApiRequest(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public String getAppId() {
        return appId;
    }

    public String getToken() {
        return token;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public static ApiRequest buildFromNewUrl(String url) {
        return new ApiRequest(url);
    }

    /**
     * demo
     *
     * @return
     */
    public String createNewUrl(String token, String appId, long timestamp) {
        return this.url + "&token=" + token + "&appId=" + appId + "&timestamp=" + timestamp;
    }
}
